package com.itheima.web;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.pojo.Test;
import com.itheima.service.TestService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//import jdk.nashorn.internal.ir.annotations.Reference;

@RequestMapping("/test")
/**
 * @Controller
 * @ResponseBody
 */
@RestController
public class TestController {

//    用dubbo的，导包慢一点
    @Reference
TestService testService;

    @RequestMapping("/m1")
    public List<Test> m1(){

        return testService.m1();//alt + enter
    }


}
